import { defineStore } from "pinia";
let useUserStore = defineStore({
  id: "user",
  state: () => ({
    userInfo: {},
    token: "",
  }),
    actions: {
        async userLogin(data) {
            let res = await this.$api.user.login(data);
            console.log(data);
            
            this.userInfo = data;
        },
    },
    getters: {
        getUserInfo() {
            return this.userInfo;
        }
    }
})
export default useUserStore;